Skip to content

Add development principles to AGENTS.md - #4547

Draft
peterschmidt85 wants to merge 3 commits into
masterfrom
pr_development_principles
Draft

peterschmidt85 wants to merge 3 commits into
masterfrom
pr_development_principles

Conversation

@peterschmidt85

Copy link
Copy Markdown
Contributor

Add development principles to AGENTS.md to ensure agents follow dstack conventions when making changes, including codebase size, contracts and interfaces, design simplicity, types, tests, and documentation.

Require explicit escalation of design or implementation issues and exceptions to conventions, while keeping improvements scoped to the changes.

Comment thread AGENTS.md
1. When it comes to implementation, simplicity is a priority. Aim for the simplest and smallest solutions where possible.
2. The repo has very strong conventions over how code and documentation are written. This includes design approaches, interface approaches, models, level of verbosity, etc.
3. When it comes to documentation or comments, we always aim for a minimal but very clear and explicit style. Explicitness doesn't mean verbosity or a "defensive approach". Specifics mean explaining the main point simply and clearly - focusing on the main point, what, why, etc.
4. If the contract of a method or a class is unclear from the code, it must be documented, but the documentation's purpose is not verbosity or repeating the obvious but explaining the context of the contract: who invokes this and why, and what is special about this method or class, etc. Simple and clear inline comments are also helpful, especially if they are implementation-specific (not contract-specific).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

who invokes this and why

I find such comments somewhat annoying. When adding or removing callers, these comments either get out of sync or require changes. Finding the list of callers is trivial, so I think it's almost never necessary to reference them in comments or docstrings.

I believe the docstring should only describe the contract itself, not who uses it.

@peterschmidt85
peterschmidt85 marked this pull request as draft November 27, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants